<template>
  <ul class="clearfix p-list">
    <li v-for="item in manageList" :key="item.id">
      <img class="avatar" v-bind:src="item.avatar">
      <p>{{item.nickname}}</p>
      <img class="sub-img" v-bind:src="item.subLogo">
      <br>
      <el-button class="invite-btn" type="primary" v-if="isShare">邀请</el-button>
    </li>
  </ul>
</template>

<script>
export default {
  props: ['manageList'],
  data () {
    return {
      isShare: true
    }
  },
  created () {
    this.isShare = this.$route.path === '/history/detail/player' ? '' : true
  }
}
</script>

<style lang="scss">
@import '../../../styles/var.scss';
.p-list {
  margin-top: 20px;
  li {
    padding: 30px 0;
    float: left;
    width: 193px;
    border: 1px solid #e9e9e9;
    text-align: center;
    margin: 0 20px 20px 0;
    .avatar {
      width: 60px;
      height: 60px;
      border-radius: 50%;
    }
    .sub-img {
      width: 64px;
      height: 14px;
    }
    img {
      margin-bottom: 20px;
    }
    p {
      margin-bottom: 10px;
      font-size: 16px;
      color: #333;
    }
    .invite-btn {
      background-color: $orange;
      border-color: $orange;
      padding: 7px 15px;
    }
  }
}

.p-list li:nth-child(4n) {
  margin: 0;
}
</style>
